

<link rel="stylesheet" type="text/css" href="/static/My97DatePicker/skin/WdatePicker.css" />
     <script charset="utf-8" src="/static/My97DatePicker/WdatePicker.js"></script>
    
    <section class="topBanners">
         <div class="icon"></div>
         <div class="topBannersNav">
         <span data-url="/admin/devlist/lists" data-container="rt_content"   class="topBannerItem">资产列表</span>
         >
         <span data-url="/admin/devlist/infoData" data-container="rt_content" data-param-id="<?php echo $id;?>"   class="topBannerItem">资产详情</span>
         >
         <span data-url="/admin/devlist/depthlog" data-container="rt_content" data-param-id="<?php echo $id;?>"   class="topBannerItem">档案查询</span>
         </div>
      </section>
      <section style="margin-top:10px;margin-left:auto;margin-right:auto;">
          调配时间：<input name="starttime"  id="starttime" class="Wdate textbox" placeholder="开始时间"  onfocus="WdatePicker({lang:'zh-cn'})" value="<?php echo $request['starttime']; ?>" size="12"  type="text" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;" >
          -<input name="endtime" id="endtime" class="Wdate textbox" placeholder="结束时间"  onfocus="WdatePicker({lang:'zh-cn'})" value="<?php echo $request['endtime']; ?>" size="12" type="text" style="padding: 0 5px;font-size: 12px;border: 1px #139667 solid;vertical-align: middle;" >
      <input type="button" value="搜索" class="group_btn research" id="resource" page="1" />
      
      <br style="clear:both;width:0px;height:0px;">
     </section>
 
       
   
<table class="table" style="margin-top:10px;">

<tr>
<th><input id="all" type="checkbox"></th>
<th>ID</th>
<th>时间</th>
<th>责任人账号</th>
<th>责任人姓名</th>
<th>责任人部门</th>
<th>操作人姓名</th>
<th>操作</th>

</tr>

<?php 
foreach($lists['data'] as $key=>$val)
{
?>
<tr data-id="<?php echo $val['id']; ?>">

<td style="text-align:center;">
<input type="checkbox" value="<?=$val['id']?>" class="checkBoxInput" name="checked[]" /></td>
<td><?php echo $val['id'];?></td>
<td><?php echo $val['dtime'];?></td>
<td><?php echo $val['useUser']['uname'];?></td>
<td><?php echo $val['useUser']['nickname'];?></td>
<td><?php 
  echo "[".$FirstDepList[$val['useUser']['first_depid']]['depname']."]";
  if(!empty($SecondDepList[$val['useUser']['depid']]))
	{
      echo '['.$SecondDepList[$val['useUser']['depid']]['depname']."]";
   }
 
 ?></td>
<td><?php echo $val['rkUser']['uname']."[".$val['rkUser']['nickname']."]";?></td>

<td style="text-align:right;">

<input type="button" value="删除" class="link_btn del"/>

</td>
</tr>
      <?php
      }
	  ?>
</table>
 <input type="hidden" name="devlistID" id="devlistID" value="<?php echo $id;?>" />
{include file="../application/admin/view/layout/page_tpl_new.html" /}
      <script type="text/javascript">
      
      function myResearch(){
		   var url="/admin/devlist/depthlog";
		  
		   var starttime =$("#starttime").val();
		   var endtime =$("#endtime").val();
       if(starttime!="" && endtime=="")
       {
          ErrTiShi("请选择结束日期");return false;
       }
       if(starttime=="" && endtime!="")
       {
          ErrTiShi("请选择开始日期");return false;
       }
		   var id=$("#devlistID").val();
		
		   var page=$("#cpage").val();
		   var param={
				  
				   starttime:starttime, 
				   endtime:endtime, 
				   id:id,
				   page:page,
		   };
		   ContentGet(url,param);
	   }
     
      
           $(function(){
        	   //设置搜索栏
        	   $(".research").click(function(){
        		   var page =$(this).attr("page");
        		   $("#cpage").val(page);
        		   myResearch();
        		   
        	   });
        	   
        	   
        	   
        	  
        	   
        	   

        	   //删除项
        	   $('.del').click(function(){
        		   var that =this;
        		   var url="/admin/devlist/del_depthlog";
        		   var id=$(that).parent().parent().attr('data-id');
        		   var param={
        				   id:id
        		   };
        		   cofirmsss_tishi(1,'您确定要删除吗?',function(id){
        			 
        			   AjaxRequest(url,param,function(data){
            			   if(data.err==0)
            			   {
            				   SuccessTiShi("操作成功");
            				   
            				   $(that).parent().parent().remove();
            				   myResearch();
            			   }
            			   else
            			   {
            				   ErrTiShi("操作失败");
            			   }
            		   });
        			   
        		   });
        	   });
        	   
        	   //导航
         	   $(".topBannerItem").click(function(){
         		   
         		   var attArr = $(this).attr();
             	   goToSelfLink(attArr);
             	   
         			
         	   });
  			   //全选
  		
  				$("#all").click(function(){   
			    	if(this.checked){   
			        	$(".checkBoxInput").attr("checked", true);  
			        	$(".checkBoxInput").prop("checked", true);  
			    	}else{   
						$(".checkBoxInput").attr("checked", false);
						$(".checkBoxInput").prop("checked", false);
			    	}   
			    	var se=getAllSelectItem();
			    	//console.log(se);
			 	}); 
  			   
  			   
  				 
  			
           });
           
	  </script>
   